package com.heima.article.api;

import com.heima.model.article.pojos.ApArticleContent;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author mgw
 * @create 2021/9/27 17:28
 */

@FeignClient(value ="leadnews-article",path = "/api/v1/article")
public interface ArticleContentFeign {
    @GetMapping("/article/{id}")
    ResponseResult<ApArticleContent> getArticle(@PathVariable(value = "id") String articleId);
    @PostMapping("/article/{id}")
    ResponseResult updateStaticUrl(@RequestParam(value = "url") String url, @PathVariable(value = "id") String articleId);
    @GetMapping("/list/{tag}/{page}/{size}")
     ResponseResult list(
            @PathVariable(value = "tag") Integer tag,
            @PathVariable(value = "page") Integer page,
            @PathVariable(value = "size") Integer size);
}